﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/MasterPage/Site1.Master" AutoEventWireup="true" CodeBehind="FeedBackManager.aspx.cs" Inherits="TARS.AdminCP.FeedBack" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div>
            <telerik:RadSkinManager ID="Metro" runat="server" Skin="Hay" />
            <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="true" />
            <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="btnSubmit">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" UpdatePanelCssClass="" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" 
                    AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
                    AutoGenerateColumns="False" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" Skin="Hay"
                    EnableLinqExpressions="false" >
                    <ClientSettings>
                        <Selecting AllowRowSelect="True" />
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                    <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ID" DataSourceID="SqlDataSource1" EnableColumnsViewState="False"
                        FilterExpression="([Status] = True)">
                        <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="ID" Visible="false" DataType="System.Guid" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="FeedBack" FilterControlAltText="Filter FeedBack column" HeaderText="FeedBack" SortExpression="FeedBack" UniqueName="FeedBack">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="CustomerFullName" FilterControlAltText="Filter CustomerFullName column" HeaderText="Customer's Full Name" SortExpression="CustomerFullName" UniqueName="CustomerFullName">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rating" FilterControlAltText="Filter Rating column" HeaderText="Rating" SortExpression="Rating" UniqueName="Rating">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridCheckBoxColumn DataField="Status" DataType="System.Boolean" CurrentFilterFunction="EqualTo"  CurrentFilterValue="True" AllowFiltering="true" AutoPostBackOnFilter="true" FilterControlAltText="Filter Status column" HeaderText="Status" SortExpression="Status" UniqueName="Status">
                            </telerik:GridCheckBoxColumn>
                            <telerik:GridBoundColumn DataField="CreateTime" FilterControlAltText="Filter CreateTime column" HeaderText="CreateTime" SortExpression="CreateTime" UniqueName="CreateTime">
                                <ColumnValidationSettings>
                                    <ModelErrorMessage Text="" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                        <EditItemStyle BackColor="LightGreen" />
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" PageSizeControlType="RadComboBox" />
                    </MasterTableView>
                    <PagerStyle Mode="NextPrevNumericAndAdvanced" PageSizeControlType="RadComboBox" />
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TARS_DeliveryConnectionString %>" SelectCommand="SELECT * FROM [t_FeedBack] ORDER BY [CreateTime] DESC"></asp:SqlDataSource>
                <div style="margin-top: 10px">
                    <telerik:RadButton ID="btnViewFeedBack" Skin="Metro" Width="200px" OnClick="btnViewFeedBack_Click" AutoPostBack="true" runat="server" Text="View Feedback"></telerik:RadButton>
                </div>
                <telerik:RadAjaxPanel ID="RadAjaxPanel2" Visible="false" runat="server" HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1">
                    <table style="width: 100%;">
                        <tr>
                            <td>
                                <asp:Label ID="Label1" runat="server" Text="Full Name :"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtFullName" runat="server" Skin="Hay">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFullName" ErrorMessage="*" ForeColor="Red">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label2" runat="server" Text="Phone :"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadMaskedTextBox ID="txtPhone" runat="server" Mask="(###) ###-####" LabelWidth="64px" Skin="Hay" TextWithLiterals="() -" value="(___) ___-____" Width="160px">
                                </telerik:RadMaskedTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPhone" ErrorMessage="*" ForeColor="Red">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label3" runat="server" Text="Email :"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox ID="txtEmail" runat="server" Skin="Hay">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEmail" ErrorMessage="*" ForeColor="Red">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label4" runat="server" Text="Rating :"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadRating ID="rtRating" runat="server" Skin="Hay">
                                </telerik:RadRating>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label5" runat="server" Text="FeedBack :"></asp:Label>
                            </td>
                            <td>
                                <br />
                                <telerik:RadEditor ID="RadEditor1" runat="server">
                                </telerik:RadEditor>
                            </td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td>
                                <telerik:RadButton ID="btnSubmit" runat="server" Text="Change Status" AutoPostBack="true" Skin="Metro" Width="200px" OnClick="btnSubmit_Click">
                                </telerik:RadButton>
                                <br />
                            </td>
                        </tr>
                    </table>
                </telerik:RadAjaxPanel>
            </telerik:RadAjaxPanel>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>

        </div>
</asp:Content>
